<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/component/commonTagLib.jsp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
    <title></title>
   <%@ include file="/WEB-INF/component/commonCSS.jsp"%>
<style type="text/css">
    	.text-left {
    		color:#949494;
    	}
    </style>

</head>
<body class="skin-blue-light sidebar-mini fixed skin-blue-light-frame">
    <section class="content-header">
        <h1>
             备案药品详情
            <!--<small>Control panel</small>-->
        </h1>
        <ol class="breadcrumb">
            <li><a href="${ctx}/home.jsp"><i class="fa fa-home"></i>首页</a></li>
            <li class="active"><a href="#">备案药品详情</a></li>
            <!--<li class="active">Dashboard</li>-->
        </ol>
    </section>
    <section class="content">
    <div class=" box box-success ">    
            <!-- form start -->
            <form role="form" class="form-horizontal">
                <div class="box-body">
                	<div class="form-group  form-group-xs">
                	    <label for="inputTextAlter1" class="col-sm-2 text-right">药品编码：</label>
                        <div class="col-sm-4 text-left">
                        	${list.drugCode }
                        </div>
                        <label for="inputTextAlter1" class="col-sm-2 text-right">通用名：</label>
                        <div class="col-sm-4 text-left">
                        	${list.drugName }
                        </div>
                    </div>
                    <div class="line"></div>
                    <div class="form-group  form-group-xs">
                        <label for="inputTextAlter1" class="col-sm-2 text-right">商品名：</label>
                        <div class="col-sm-4 text-left">
                           		 ${list.busName }
                        </div>
                        <label for="inputTextAlter2" class="col-sm-2 text-right">剂型：</label>
                        <div class="col-sm-4 text-left">
                            	${list.formName }
                        </div>
                    </div>
                    <div class="line"></div>
                    <div class="form-group  form-group-xs">
                        <label for="inputTextAlter1" class="col-sm-2 text-right">规格：</label>
                        <div class="col-sm-4 text-left">
                            	${list.specName }
                        </div>
                        <label for="inputTextAlter2" class="col-sm-2 text-right">转换系数：</label>
                        <div class="col-sm-4 text-left">
                           		${list.factor }
                        </div>
                    </div>
                    <div class="line"></div>
                    <div class="form-group  form-group-xs">
                        <label for="inputTextAlter1" class="col-sm-2 text-right">单位：</label>
                        <div class="col-sm-4 text-left">
                         		${list.unit }
                        </div>
						<label for="inputTextAlter1" class="col-sm-2 text-right">材质：</label>
                        <div class="col-sm-4 text-left">
                         		${list.materialName }
                        </div>
                    </div>
                    <div class="line"></div>
					<div class="form-group  form-group-xs">
                        <label for="inputTextAlter2" class="col-sm-2 text-right">生产企业：</label>
                        <div class="col-sm-4 text-left">
                      		    ${list.compName }
                        </div>
                        <label for="inputTextAlter2" class="col-sm-2 text-right">医院名称：</label>
                        <div class="col-sm-4 text-left">
                      		    ${list.hospName }
                        </div>						
                    </div>
					<div class="line"></div>
					<div class="form-group  form-group-xs">
					    <label for="inputTextAlter1" class="col-sm-2 text-right">配送企业：</label>
                        <div class="col-sm-4 text-left">
                         		${list.scCompname }
                        </div>	
                        <label for="inputTextAlter2" class="col-sm-2 text-right">医院所属地区：</label>
                        <div class="col-sm-4 text-left">
                      		    ${list.arFullname }
                        </div>
                    </div>
                    <div class="line"></div>
                    <div class="form-group  form-group-xs">
                        <label for="inputTextAlter1" class="col-sm-2 text-right">采购价格(元)：</label>
                        <div class="col-sm-4 text-left">
                            <fmt:formatNumber type="number" value="${list.purPrice}" pattern=".00"/>
                        </div>
                        <label for="inputTextAlter2" class="col-sm-2 text-right">采购数量：</label>
                        <div class="col-sm-4 text-left">
                            	${list.purAmount }
                        </div>
                    </div>
                    <div class="line"></div>
                   <div class="form-group  form-group-xs">
                        <label for="inputTextAlter2" class="col-sm-2 text-right">备案类型：</label>
                        <div class="col-sm-4 text-left">
                           	${list.isLongtimePlan==1?"长期备案":"临时备案"}	 
                        </div>
                        <label for="inputTextAlter4" class="col-sm-2 text-right">备案申请时间：</label>
                        <div class="col-sm-4 text-left">
                            <fmt:formatDate pattern="yyyy-MM-dd" value="${list.bakSubmitDatetime}" />
                        </div>
                    </div>
                     <div class="line"></div>
                    <div class="form-group  form-group-xs">
                        <label for="inputTextAlter4" class="col-sm-2 text-right">备案理由：</label>
                        <div class="col-sm-9 text-left">
                            ${list.bakReason}
                        </div>
                        						
                    </div>
                    <div class="line"></div>
					<div class="form-group  form-group-xs">
					<label for="inputTextAlter4" class="col-sm-2 text-right">审核日期：</label>
                        <div class="col-sm-4 text-left">
                            <fmt:formatDate pattern="yyyy-MM-dd" value="${list.auditDatetime}" />
                        </div>
                        <label for="inputTextAlter4" class="col-sm-2 text-right">审核状态：</label>
                        <div class="col-sm-4  text-left">
     						<c:if test="${list.auditStatus == 0}">
							    未审核
							</c:if>
							<c:if test="${list.auditStatus == 1}">
							    通过
							</c:if>
							<c:if test="${list.auditStatus == 2}">
							   不通过
							</c:if>
                        </div>
                    </div>
					<div class="line"></div>
					<div class="form-group  form-group-xs">
                        <label for="inputTextAlter4" class="col-sm-2 text-right">医院备注：</label>
                        <div class="col-sm-4 text-left">
                            ${list.remark}
                        </div>
                    </div>
                    <div class="line"></div>
                    <div class="form-group  form-group-xs">
                        <label for="inputTextAlter4" class="col-sm-2 text-right">审核备注：</label>
                        <div class="col-sm-9">
                            ${list.auditRemaks }
                        </div>
                    </div>
                </div>
                
                <div class="box-footer text-center">
                    <button type="button" class="btn btn-danger btn-sm" onclick='history.go(-1)'>返&nbsp;回</button>
                </div>

                
            </form>
        </div>
    </section>
    <%@ include file="/WEB-INF/component/commonJS.jsp"%>
    <script type="text/javascript">
        $("[data-mask]").inputmask();
        
       function check(){
    	   var type = $("#type").val()=="yes"?"确定通过吗？":"确定不通过？";
    	   var bakPurId = "${list.bakPurId}";
    	   var auditStatus = $("#type").val()=="yes"?"1":"2";
    	   var auditRemaks = $("#auditRemaks").val();
    	   $.HN.message.confirm(type, '', '').on(function (e) {
               if (e) {
            	   $.ajax({
            		   type : "POST",
						url : "${ctx}/baseBakpurchase/dataAddAndEdit.html",
						data : "bakPurId=" + bakPurId
								+ "&auditStatus=" + auditStatus+ "&auditRemaks="+auditRemaks,
						success : function(msg) {
							if(msg){
								window.location.href="${ctx}/baseBakpurchase/toDataJsp.html";
							}else{
								$.HN.message.alert('操作失败！','提示信息', 'success');
								window.location.href="${ctx}/baseBakpurchase/toDataJsp.html";
							}
							
							
						}
            	   });
               }
           });
       }
        
    </script>
</body>
</html>